import { createTextVNode, createElement } from "./vnode";
export function renderMixin(Vue) {
  // 扩展方法
  Vue.prototype._c = function () {
    return createElement(...arguments);
  };
  Vue.prototype._s = function (value) {
    if (value === null) return;
    return typeof value === "object" ? JSON.stringify(value) : value;
  };
  Vue.prototype._v = function (text) {
    return createTextVNode(text);
  };
  Vue.prototype._render = function () {
    const vm = this;
    const { render } = vm.$options;
    const vnode = render.call(vm);
    return vnode;
  };
}
